/* 
 * File:   ConnBase.cpp
 * Author: kisme
 * 
 * Created on 26 December 2012, 10:19 PM
 */

#include "ConnBase.h"

ConnBase::ConnBase() {
}

ConnBase::ConnBase(const ConnBase& orig) {
}

ConnBase::~ConnBase() {
}

/*
 * setnonblocking - 设置句柄为非阻塞方式
 */
int ConnBase::setNonblock(int aFd) {
    if (fcntl(aFd, F_SETFL, fcntl(aFd, F_GETFD, 0) | O_NONBLOCK) == -1) {
        return RESULT_FAI;
    }
    return RESULT_SUC;
}